<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>Add Book</title>
  <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.0.1/css/bootstrap.min.css">
</head>
<body>
<div class="container">
  <h1>添加书籍</h1>

  <form th:action="@{/books}" method="post">
    <div class="mb-3">
      <label for="name" class="form-label">书名</label>
      <input type="text" class="form-control" id="name" name="name" required>
    </div>
    <div class="mb-3">
      <label for="category" class="form-label">分类</label>
      <input type="text" class="form-control" id="category" name="category" required>
    </div>
    <div class="mb-3">
      <label for="price" class="form-label">价格</label>
      <input type="number" class="form-control" id="price" name="price" required>
    </div>
    <div class="mb-3">
      <label for="publisher" class="form-label">出版社</label>
      <input type="text" class="form-control" id="publisher" name="publisher" required>
    </div>
    <button type="submit" class="btn btn-primary">提交</button>
    <a href="/books/list" class="btn btn-secondary">返回</a>
  </form>
</div>
</body>
</html>
